package com.reload.stt.spark.real_ime;

import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import reactor.core.publisher.Flux;

/**
 * @Date: 2024/12/6 - 20:15
 * @Version: 17
 * @Author: Reloading
 * @Description:
 */
@Service
public class OpenAiAudioService {

    public Flux<String> processAudioFile(MultipartFile file) {
        WebSocketRequestClient webSocketRequestClient = new WebSocketRequestClient();
        // 调用封装的 WebSocketRequestClient，返回 Flux<String>
        Flux<String> stringFlux = webSocketRequestClient.sendFile(file);
        return webSocketRequestClient.sendFile(file);
    }
}
